#ifndef __STM32_UTIL_H__
#define __STM32_UTIL_H__

#include <stdbool.h>
#include <stdio.h>

#define p() printf("%s:%d\r\n", __FILE__, __LINE__)

#define null NULL

#define __out__
#define __in__

typedef unsigned char byte;
typedef byte u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef int c32; // char 32 bit

bool is_digit(char c);
bool is_upper(char c);
bool is_lower(char c);
void p_str(char s[]);

int next_rand_limit(int min, int max);

int next_rand_limit_max(int max);

char next_rand_char(void);

void p_barr(byte data[], int len);

void p_i(int d);

#endif
